﻿// Copyright (c)  MOKEYISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

namespace NSQL.Expressions.Functions
{
    public class ExtractFunction : BaseExpression, IExtractFunction
    {
        public IValueExpression DateTime { get; set; }
        public ExtractType Type { get; set; }

        public ExtractFunction(IValueExpression dateTime, ExtractType extractType)
        {
            DateTime = dateTime;
            Type = extractType;
        }
        
        public override T Accept<T>(IExpressionVisitor<T> visitor) => visitor.Visit(this);
    }
}